package com.jiyi.retrofit;


import com.jiyi.bean.Result;
import com.jiyi.bean.datainput.DataInputBaseBean;
import com.jiyi.bean.datainput.new_input.BaseBuildBean;
import com.jiyi.bean.datainput.new_input.BuildListBean;
import com.jiyi.bean.datainput.new_input.DataInputStreetBean;
import com.jiyi.bean.datainput.new_input.DataInputZoneBean;
import com.jiyi.bean.datainput.new_input.DetailBuildBean;
import com.jiyi.bean.datainput.new_input.FireEquipBean;
import com.jiyi.bean.datainput.new_input.FireManageBean;
import com.jiyi.bean.datainput.new_input.FireSpaceBean;
import com.jiyi.bean.datainput.new_input.FireZoneBean;
import com.jiyi.bean.datainput.new_input.SafeEvacuationBean;
import com.jiyi.bean.datainput.new_input.SpaceLawBean;
import com.jiyi.bean.datainput.new_input.SpecialFireBean;
import com.jiyi.bean.maintenance.Task;
import com.jiyi.bean.system.UserBean;
import com.jiyi.bean.zone.RxPersonInfoBean;
import com.jiyi.bean.zone.RxUploadBean;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;

/**
 * Created by Administrator on 2018/2/8.
 */

public interface SystemService {


    //注册获取用户权限
    @GET("Api/Api/newReg")
    Observable<Result<List<UserBean>>> getRegistInfo();

    //注册获取用户权限
    @FormUrlEncoded
    @POST("Api/Api/submitA")
    Observable<Result<Object>> regist(@Field("phone") String phone,@Field("password") String password,@Field("unit") String unit,@Field("phoneUserInput") String phoneUserInput);

    //社区好友个人资料
    @GET("Api/Friend/personal/access_token/{token}/id/{id}")
    Observable<Result<RxPersonInfoBean>> getPersonInfo(@Path("token") String token, @Path("id") String id);

    @Multipart
    @POST("Api/Community/ajax_sign")
    Observable<Result<RxUploadBean>> uploadPicture(@Part MultipartBody.Part token, @Part MultipartBody.Part file);


    @GET("Api/Friend/doAddFriendApply/access_token/{token}/id/{id}")
    Observable<Result<Object>> addFriend(@Path("token") String token,@Path("id") String id);

    //维保主管的维保任务列表
    @GET("Api/WbTask/zgIndex/access_token/{token}/type/{type}/p/{p}")
    Observable<Result<List<Task>>> getLeaderWeiBaoTask(@Path("token") String token, @Path("type") int type, @Path("p") int p);

    //维保员工的维保任务列表
    @GET("Api/WbTask/index/access_token/{token}/type/{type}/p/{p}")
    Observable<Result<List<Task>>> getWeiBaoTask(@Path("token") String token, @Path("type") int type, @Path("p") int p);


    /*高层评估*/
    // 楼层录入- 查看建筑基础信息
    @GET("Api/FireSafety/build_info_detail/access_token/{token}/build_info_id/{build_info_id}")
    Observable<Result<DataInputBaseBean>> getBaseBuildInfo(@Path("token") String token, @Path("build_info_id") String build_info_id);


    //楼层基础属性保存
    @POST("Api/FireSafetyNew/build_info")
    Observable<Result<BaseBuildBean>> postBaseBuildInfo(@Body MultipartBody  body);

    @FormUrlEncoded
    @POST("Api/FireSafetyNew/build_info")
    Observable<Result<BaseBuildBean>> getBaseBuildInfo(@Field("access_token") String token , @Field("id") String id, @Field("type") int type);


    //楼层详细属性保存
    @FormUrlEncoded
    @POST("Api/FireSafetyNew/build_detail")
    Observable<Result<DetailBuildBean>> postDetailBuildInfo(@Field("access_token") String token , @Field("build_id") String build_id, @Field("type") int type, @Field("data") String data);

    //楼层详细属性读取
    @FormUrlEncoded
    @POST("Api/FireSafetyNew/build_detail")
    Observable<Result<DetailBuildBean>> getDetailBuildInfo(@Field("access_token") String token ,@Field("build_id") String build_id,@Field("type") int type);

    //建筑场所消防行政许可编辑
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<SpaceLawBean>> postSpaceLawInfo(@Body MultipartBody  body);

    //建筑场所消防行政许可读取
    @FormUrlEncoded
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<SpaceLawBean>> getSpaceLawInfo(@Field("access_token") String token ,@Field("build_id") String build_id,@Field("type") int type,@Field("action_type") String action_type);

    //消防车道与消防扑救场地编辑
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<FireSpaceBean>> postFireLanesInfo(@Body MultipartBody  body);

    //消防车道与消防扑救场地读取
    @FormUrlEncoded
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<FireSpaceBean>> getFireLanesInfo(@Field("access_token") String token ,@Field("build_id") String build_id,@Field("type") int type,@Field("action_type") String action_type);

    //防火分区与平面布置编辑
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<FireZoneBean>> postFireZoneInfo(@Body MultipartBody  body);

    //防火分区与平面布置读取
    @FormUrlEncoded
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<FireZoneBean>> getFireZoneInfo(@Field("access_token") String token , @Field("build_id") String build_id, @Field("type") int type, @Field("action_type") String action_type);

    //安全疏散与避难编辑
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<SafeEvacuationBean>> postSafeEvacuationInfo(@Body MultipartBody  body);

    //安全疏散与避难读取
    @FormUrlEncoded
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<SafeEvacuationBean>> getSafeEvacuationInfo(@Field("access_token") String token , @Field("build_id") String build_id, @Field("type") int type, @Field("action_type") String action_type);

    //消防设施设备是否完好有效编辑
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<FireEquipBean>> postFireEquipInfo(@Body MultipartBody  body);

    //消防设施设备是否完好有效读取
    @FormUrlEncoded
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<FireEquipBean>> getFireEquipInfo(@Field("access_token") String token , @Field("build_id") String build_id, @Field("type") int type, @Field("action_type") String action_type);

    //专项防火情况编辑
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<SpecialFireBean>> postSpecialFireInfo(@Body MultipartBody  body);

    //专项防火情况读取
    @FormUrlEncoded
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<SpecialFireBean>> getSpecialFireInfo(@Field("access_token") String token , @Field("build_id") String build_id, @Field("type") int type, @Field("action_type") String action_type);

    //消防安全管理方面编辑
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<FireManageBean>> postFireManageInfo(@Body MultipartBody  body);

    //消防安全管理方面读取
    @FormUrlEncoded
    @POST("Api/FireSafetyNew/edit")
    Observable<Result<FireManageBean>> getFireManageInfo(@Field("access_token") String token , @Field("build_id") String build_id, @Field("type") int type, @Field("action_type") String action_type);

    //查看项目列表
    @FormUrlEncoded
    @POST("Api/FireSafetyNew/project")
    Observable<Result<BuildListBean>> getBuildList(@Field("access_token") String token , @Field("name") String name, @Field("page") int page,@Field("street") String street,@Field("community") String community);

    //获取集美高层调查的基础信息
    @FormUrlEncoded
    @POST("Api/FireSafety/build_info_detail")
    Observable<Result<DataInputBaseBean>> getJMBaseBuildInfo(@Field("access_token") String token , @Field("build_id") String build_id);


    //思明高层录入街道读取
    @FormUrlEncoded
    @POST("Api/FireSafetyNew/get_street")
    Observable<Result<List<DataInputStreetBean>>> getDataInputStreet(@Field("access_token") String token);

    //思明高层录入社区读取
    @FormUrlEncoded
    @POST("Api/FireSafetyNew/get_community")
    Observable<Result<List<DataInputZoneBean>>> getDataInputZone(@Field("access_token") String token,@Field("street") String street);


}
